#include "stdafx.h"
#include "Warning.h"
#include "DBDataMgr.h"


void CWarningMgr::Report(DWORD dwType)
{
    bool bOut = false;
    switch (dwType)
    {
    case E_WHISPER:
        {
            bOut = GET_DB().m_bWhisper;;
        }
        break;
    case E_BAGFULL:
        {
            bOut = GET_DB().m_bBagFull;
        }
        break;
    case E_BYPK:
        {
        }
        break;
    case E_OFFLINE:
        {
            bOut = GET_DB().m_bOffLine;
        }
        break;
    case E_DEAD:
        {
            bOut = GET_DB().m_bDead;
        }
        break;
    case E_BOTNONE:
        {
            bOut = GET_DB().m_bBot;
        }
        break;
    case E_BLOCK:
        {
            bOut = GET_DB().m_bBlock;
        }
        break;
    case E_PRPJECTILE:
        {
            bOut = GET_DB().m_bProjects;
        }
        break;
    }
    if (!bOut) return;
    if ( GetTickCount()-AryData[dwType].dwLast < AryData[dwType].dwTime)
        return ;
    AryData[dwType].dwLast = GetTickCount();
    ::PostMessage(m_hExe, m_msg, dwType, 0);
}